﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/HRManagerUI/HrManager.Master"
    AutoEventWireup="true" CodeBehind="SearchEmployee.aspx.cs" Inherits="HRM.UI.HRManagerUI.EmpModule.SearchEmployee" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../HigherManagementUI/../../Styles/Employee/SearchEmployeeCss.css"
        rel="stylesheet" type="text/css" />
    <fieldset>
        <legend>Search Employee</legend>
        <table class="fullTBSearch">
            <tr>
                <td style="width: 50%">
                    <table class="ByCodeTB">
                        <tr>
                            <td class="searchbyCodetext">
                                Search By Code
                            </td>
                            <td>
                                <input type="text" id="txtSearchCode" runat="server" class="codeSearch" />
                                <input type="submit" value="Search" class="btnCss" id="btnsearchByCode" runat="server"
                                    onserverclick="SearchCode" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                    <table class="ByProjectTB">
                        <tr>
                            <td class="searchbyCodetext">
                                Search By Project
                            </td>
                            <td>
                                <select id="ddlEmpProject" runat="server" class="dropdownCss">
                                </select>
                                <input type="submit" value="Search" class="btnCss" id="btnSearchByProject" runat="server"
                                    onserverclick="SearchByProject" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table class="ByCodeTB">
                        <tr>
                            <td class="searchbyCodetext">
                                Search By Catagory
                            </td>
                            <td>
                                <select id="ddempCatagory" runat="server" class="dropdownCss">
                                </select>
                                <input type="submit" value="Search" class="btnCss" id="btnSearchByCatagory" runat="server"
                                    onserverclick="SearchByCatagory" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                    <table class="ByProjectTB">
                        <tr>
                            <td class="searchbyCodetext">
                                Search By Status
                            </td>
                            <td>
                                <select id="ddStatus" runat="server" class="dropdownCss">
                                    <option>Active</option>
                                    <option>Suspend</option>
                                    <option>Retire</option>
                                    <option>Leave without pay</option>
                                    <option>OSD</option>
                                </select>
                                <input type="submit" value="Search" class="btnCss" id="btnSearchByStatus" runat="server"
                                    onserverclick="SearchByStatus" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </fieldset>
    <div id="msgDIV" runat="server">
        <p id="msgLebel" runat="server">
        </p>
    </div>
    <div class="MessageforSearchDIV" id="MessageforSearchDIV" runat="server">
        <p class="helptips">
            * Helping Tips *
        </p>
        <ul>
            <li>Search By Code:<br />
                You can search an employee inserting employee code example-SSEL10001</li>
                <hr/>
        </ul>
        <ul>
            <li>Search By Project:<br />
                You can search an employee Select employee Project(Project Name) example-Festival,Compare
                Market,</li>  <hr/>
        </ul>
        <ul>
            <li>Search By Catagory:<br />
                You can search an employee Select employee Catagory example-Marketing,Sales,HR,Distributor</li>  <hr/>
        </ul>
        <ul>
            <li>Search By Status:<br />
                You can search an employee Select employee Status example-Active,Inactive,Suspend</li>
        </ul>
    </div>
    <div id="searchGridDIV" runat="server">
        <fieldset>
            <legend>Employee Information</legend>
            <asp:GridView runat="server" ID="searchEmpGrid" AutoGenerateColumns="False" Width="100%"
                BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                CssClass="GridviewStyle" OnPageIndexChanging="searchEmpGrid_PageIndexChanging" 
                AllowPaging="True" PageSize="5" BackColor="White">
                <Columns>
                    <asp:TemplateField HeaderText="Employee Code">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("Code.CodeName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Name">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("Employee.Name") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Designation">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("Designation.Title") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Contact">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("Contact.Firstcontact") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Address">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("contact.PresentAddress") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Resume">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Employee.Resume", "~/Resume/{0}") %>'
                                Target="_blank" Text='<%# Eval("Employee.Resume") %>'></asp:HyperLink>
                        </ItemTemplate>
                        <ControlStyle Font-Underline="False" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Image">
                        <ItemTemplate>
                            <asp:Image ID="logo" ImageUrl='<%#Bind("Photo.FileName") %>' runat="server" Width="50"
                                Height="50" BorderStyle="Solid" BorderWidth="1" BorderColor="black" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("Code.CodeName", "~/UI/HRManagerUI/EmpModule/DetailsEmployee.aspx?emp-code={0}") %>'
                                Target="_blank" Text="Details"></asp:HyperLink>
                        </ItemTemplate>
                        <ControlStyle Font-Underline="False" />
                    </asp:TemplateField>
                </Columns>
                <FooterStyle CssClass="GridViewFooterStyle" BackColor="White" 
                    ForeColor="#000066" />
                <HeaderStyle CssClass="GridViewHeaderStyle"/>
                <PagerStyle CssClass="GridViewFooterStyle" HorizontalAlign="Center"/>
                <RowStyle CssClass="" ForeColor="#000066"/>
                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#00547E" />
            </asp:GridView>
        </fieldset>
    </div>
</asp:Content>
